<?php echo $header; ?><?php echo $column_left; ?>
    <div id="content">
        <div class="page-header">
            <div class="container-fluid">
                <div class="pull-right">

                    <a style="display: none;" href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
                <h1><?php echo $heading_title; ?></h1>

            </div>
        </div>
        <div class="container-fluid">
            <?php if ($error_warning) { ?>
                <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                </div>
            <?php } ?>
            <div class="panel panel-default">

                <div class="panel-body">
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab-general">

                            <div class="ac_details" id="comments">
                                <?php echo $extra['post_comments']; ?>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="ui_pop" id="add_comment" style="display: none;">
        <input type="hidden" id="input_post_id" />
        <input type="hidden" id="input_customer_id" />
        <div class="article_content">
            <div class="ac_item">
                <a class="ac_close" onclick="$('#add_comment').hide();"><i class="fa fa-times" aria-hidden="true"></i></a>
                <div class="ac_editor">
                    <textarea class="ac_details"  placeholder="写评论" style="height: 180px;width:580px;" id="txt_comment" ></textarea>
                </div>
                <a  onclick="send_comment()">提交</a>
            </div>
        </div>


    </div>

    <script type="text/javascript">

        function send_comment() {
            $.ajax({
                url: 'index.php?route=article/feedback/comment&token=<?php echo $token; ?>&customer_id=' + encodeURIComponent($("#input_customer_id").val()) + "&message=" + encodeURIComponent($("#txt_comment").val()),
                dataType: 'json',
                success: function(json) {
                    window.location.reload();
                },
                error: function(XMLHttpRequest, textStatus, errorThrown){
                    window.location.reload();
                }
            });



        }

        function comment( customer_id) {
            $("#input_customer_id").val(customer_id);
            $("#txt_comment").val('');
            $('#add_comment').show();
        }
    </script>
<?php echo $footer; ?>